@echo off
set pre_path=%cd%
call clean.bat
cd %pre_path%
call gen_scanner.bat
@REM cd %pre_path%
@REM call gen_parser.bat
cd %pre_path%

@echo off
setlocal enabledelayedexpansion 
@REM 延迟扩展，以在迭代中更新变量
cd src
set result=
for /d %%i in (*) do (
    set "result=!result! %%i%\*.java"
)
javac -d ..\bin -classpath ..\javacup\java-cup-11b-runtime.jar;..\lib\jgraph.jar;..\lib\callgraph.jar;..\lib\flowchart.jar %result% .\*.java
cd %pre_path%
echo 执行完毕
pause
@echo on